beryllium
An opinionated set of "high level" wrappers for the fermium SDL2 bindings.
Compared to the usual sdl2, this is much closer to the
actual SDL2 C API. It is, however, a lot less complete. If you want something
added in just file and issue and we can probably work to get it done fairly
easily. If you don't want to wait on me, just call into fermium
directly.
There are examples available if you want to see it in action.
Building
Obviously this uses SDL2. The fermium crate is used as the bindings crate. You will need version 2.0.8 or later:
- On Windows all necessary files are provided automatically by
fermium
, you don't need to do any special setup at all. Note that the default link style is dynamic, and so you will need to have SDL2.dll available to run the program. You can turn off default features and turn on static linking if you like, but this takes longer to build. - On non-Windows you need to have installed SDL2 yourself ahead of time.
Window Subsystem
This isn't SDL2 specific, it's just a general Win32 thing, but you'll probably want to set the window_subsystem to "windows" in your programs. Just add this to the top of any binary or example:
We only want it enabled when debug_assertions
are not active, because it
suppresses all default console output when it is enabled.
This line won't have any effect on the build outside Windows, so no worries about needing to check for the build being on windows.
License
This crate uses the Zlib license, the same license that SDL2 itself uses.